ul.courses
  li.course(ng-repeat="course in courses")
    h3 {{course.name}}
    ul.requirements
      li(ng-repeat="requirement in course.requirements")
        hr
        h4 {{requirement.name}}
        p="截止日期： {{ requirement.deadline | date: 'yyyy-MM-dd'}} "
        p {{requirement.content}}

        div(ng-show='!requirement.homeworks.length')
          div(ng-show='requirement.deadline < now')
            div.alert(class="alert-warning", role="alert")
              p 已经截止提交
          div(ng-hide='requirement.deadline < now')
            a.btn.btn-info(ui-sref="addHomework({requirementid: requirement._id})") 提交

        div(ng-hide='!requirement.homeworks.length')
          div(ng-show='requirement.deadline < now')
            a.btn.btn-info(ui-sref="viewHomework({id: requirement.homeworks[0]._id})") 查看
          div(ng-hide='requirement.deadline < now')
            a.btn.btn-info(ui-sref="editHomework({id: requirement.homeworks[0]._id})") 修改
